import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { BaseAdminResult, BaseResult } from "@/common/base/base.result";
import { UserTitleCertification } from "common/utils/data";

export class UserVerifyRegisterResult {
  @ApiProperty({
    description: '是否存在',
  })
  isExists: boolean;
}

export class UserLoginResult{
  @ApiProperty({
    description: 'token',
  })
  token: string;
}

export class UserPreLoginWxResult{
  @ApiProperty({
    description: 'token',
  })
  token: string | null;
}


export class UserShowMineResult extends BaseResult{
  @ApiProperty({
    description: '用户名',
  })
  name: string;

  @ApiProperty({
    description: '手机号',
  })
  mobile: string;

  @ApiProperty({
    description: '头衔',
  })
  title: string;

  @ApiProperty({
    description: '用户类型',
  })
  userType: string;

  @ApiProperty({
    description: '用户类型',
  })
  avatar: string;

  @ApiProperty({
    description: '用户类型',
  })
  titleCertification: UserTitleCertification;

  @ApiProperty({
    description: '签名',
  })
  signature: string;

  @ApiProperty({
    description: '注册时间',
  })
  createTime: number;
}


export class UserAdminIndexResult extends BaseAdminResult{
  @ApiProperty()
  id: number;

  @ApiProperty({
    description: '用户名',
  })
  name: string;

  @ApiProperty({
    description: '手机号',
  })
  mobile: string;

  @ApiProperty({
    description: '头衔',
  })
  title: string;

  @ApiProperty({
    description: '用户类型',
  })
  userType: string;

  @ApiProperty({
    description: '用户类型',
  })
  avatar: string;

  @ApiProperty({
    description: '用户类型',
    enum: UserTitleCertification,
  })
  titleCertification: UserTitleCertification;

  @ApiProperty({
    description: '签名',
  })
  signature: string;

}


export class UserOpenApiLoginCheckResult extends BaseResult{
  @ApiProperty({
    description: '用户名',
  })
  name: string;

  @ApiProperty({
    description: '手机号',
  })
  mobile: string;

  @ApiProperty({
    description: '头衔',
  })
  title: string;

  @ApiProperty({
    description: '用户类型',
  })
  userType: string;

  @ApiProperty({
    description: '用户类型',
  })
  avatar: string;

  @ApiProperty({
    description: '用户类型',
  })
  titleCertification: UserTitleCertification;

  @ApiProperty({
    description: '签名',
  })
  signature: string;

  @ApiProperty({
    description: '注册时间',
  })
  createTime: number;
}
